/*
 * @(#)MtmWorkflowProgressPriorityRule.java
 *
 * Copyright (c) 2003 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of DCIVision
 * Ltd ("Confidential Information").  You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the license
 * agreement you entered into with DCIVision Ltd.
 */
package com.dcivision.workflow.bean;

import com.dcivision.framework.bean.AbstractBaseObject;

/**
 * MtmWorkflowProgressPriorityRule.java
 * 
 * This class is the serializable bean reflecting business logic uses. It
 * represents a priority escalation rule of a specified workflow progress. For
 * examples, a rule to escalate the priority by one level after task arrived for
 * 5 minutes may have following values for the properties,
 * 
 * <pre>
 * 
 *  escalateTrigger = {@link com.dcivision.workflow.bean.MtmWorkflowProgressPriorityRule#AFTER_TASK_ARRIVED}
 *  escalateAtField = {@link java.util.Calendar#MINUTE}
 *  escalateAtAmt = 5 (task arrived for 5 mintues)
 *  escalateLevel = 1 (rise the priority by one level)
 *  escalateAckMethod = {@link com.dcivision.alert.bean.UpdateAlert#EMAIL_NOTIFICATION},{@link com.dcivision.alert.bean.UpdateAlert#SYSTEM_NOTIFICATION}
 *  
 * </pre>
 * 
 * @author Tony Chen
 * @company DCIVision Limited
 * @creation date 23/11/2004
 * @version $Revision: 1.4 $
 * @see MtmWorkflowStepPriorityRule
 */
public class MtmWorkflowProgressPriorityRule extends AbstractBaseObject {
  
  public static final String REVISION = "$Revision: 1.4 $";
  static final long serialVersionUID = -9203695176160727272L;
  
  /** Escalate the priority after task arrived for a certain time */
  public final static String AFTER_TASK_ARRIVED = "A"; // A - Task arrived for
  
  /** Escalate the priority a certain time before due date */
  public final static String BEFORE_DUE_DATE = "B"; // B - Before due date
  
  /** Sends email notification upon priority is escalated */
  public final static String NOTIFY_BY_EMAIL = "E"; // Notify by email
  
  /** Sends system notification upon priority is escalated */
  public final static String NOTIFY_BY_SYSTEM = "S"; // Notify by system message
  
  /** Identifies this escalation rule is created by workflow step */
  public final static String OBJECT_TYPE_BY_STEP = "S"; // Mtm_WF_Step_Priority_Rule
  
  /** Identifies this escalation rule is created by a specific workflow progress */
  public final static String OBJECT_TYPE_BY_PROGRESS = "P"; // Mtm_WF_Progress_Priority_Rule
  
  /** Identifies this escalation rule is created by workflow step */
  public static final String ESCALATE_TYPE_BASIC = "B"; //B - Basic (Step)
  
  /** Identifies this escalation rule is created by a specific workflow progress */
  public static final String ESCALATE_TYPE_DYNAMIC = "D"; //D - Dynamic (Progress);
  
  
  private Integer workflowProgressID = null;
  private String escalateTrigger = null;
  private Integer escalateAtField = null;
  private Integer escalateAtAmt = null;
  private Integer escalateLevel = null;
  private String escalateAckMethod = null;
  
  public MtmWorkflowProgressPriorityRule() {
    super();
  }
  /**
   * @return Returns the workflowProgressID.
   */
  public Integer getWorkflowProgressID() {
    return(this.workflowProgressID);
  }
  /**
   * @param workflowProgressID The workflowProgressID to set.
   */
  public void setWorkflowProgressID(Integer workflowProgressID) {
    this.workflowProgressID = workflowProgressID;
  }
  /**
   * @return Returns the escalateTrigger.
   */
  public String getEscalateTrigger() {
    return(this.escalateTrigger);
  }
  /**
   * @param escalateTrigger The escalateTrigger to set.
   */
  public void setEscalateTrigger(String escalateTrigger) {
    this.escalateTrigger = escalateTrigger;
  }
  /**
   * @return Returns the escalateAtField.
   */
  public Integer getEscalateAtField() {
    return(this.escalateAtField);
  }
  /**
   * @param escalateAtField The escalateAtField to set.
   */
  public void setEscalateAtField(Integer escalateAtField) {
    this.escalateAtField = escalateAtField;
  }
  /**
   * @return Returns the escalateAtAmt.
   */
  public Integer getEscalateAtAmt() {
    return(this.escalateAtAmt);
  }
  /**
   * @param escalateAtAmt The escalateAtAmt to set.
   */
  public void setEscalateAtAmt(Integer escalateAtAmt) {
    this.escalateAtAmt = escalateAtAmt;
  }
  /**
   * @return Returns the escalateLevel.
   */
  public Integer getEscalateLevel() {
    return(this.escalateLevel);
  }
  /**
   * @param escalateLevel The escalateLevel to set.
   */
  public void setEscalateLevel(Integer escalateLevel) {
    this.escalateLevel = escalateLevel;
  }
  
  /**
   * @return Returns the escalateAckMethod.
   */
  public String getEscalateAckMethod() {
    return(this.escalateAckMethod);
  }
  /**
   * @param escalateAckMethod The escalateAckMethod to set.
   */
  public void setEscalateAckMethod(String escalateAckMethod) {
    this.escalateAckMethod = escalateAckMethod;
  }
}
